import java.util.List;
import java.util.Vector;

import javax.vecmath.Point2d;
import javax.vecmath.Vector2d;
import javax.vecmath.Vector3d;

public class Body
{
	private double mass;
	private Vector3d position;
	private double delta_t;
	private Vector3d speed;
	private Vector3d acceleration;
	private Vector3d force;
	private PlanetSystem planetSystem;
	private Vector3d gravitation;
	
	public Body(double mass, Vector3d position, Vector3d speed, Vector3d gravitation)
	{
		this.mass = mass;
		this.position = position;
		this.speed = speed;
		this.gravitation = gravitation;
	}
	
	public void setPosition()
	{
		
	}
	
	/**
	 * This method returns the current position of a planet.
	 * @return
	 */
	public Vector3d getPosition()
	{
		return position;
	}
	/**
	 * With this method you can set the measure of each planet.
	 * @param measure
	 */
	public void setMeasure(double mass)
	{
		this.mass = mass;
	}
	
	/**
	 * This method returns a mass of a Planet
	 * @return
	 */
	public double getMeasure()
	{
		return mass;
	}
	
	/**
	 * Is setting the speed of the beginning.
	 * @param speed
	 */
	public void setSpeed(Vector3d speed)
	{
		this.speed = speed;
//		speed = ((planetSystem.getMeasureM() - getMeasure()) / planetSystem.getMeasureM()) * Math.sqrt((planetSystem.getG() * planetSystem.getMeasureM()) / getRadius() - planetSystem.
	}
//	public double calcSpeed()
//	{
//		return tmp_speed = ((getMeasureM() - getMeasure()) / getMeasureM()) * Math.sqrt((G * getMeasureM()) / getRadius() - getCenterOfMass().length());
//	}
	
	public double calcAcceleration()
	{
		
	}

	public Vector3d getAcceleration() {
		return acceleration;
	}

	public void setAcceleration(Vector3d acceleration) {
		this.acceleration = acceleration;
	}

	public Vector3d getForce() {
		return force;
	}

	public void setForce(Vector3d force) {
		this.force = force;
	}
}